
<div>
	<h2>dataTable表格组件显示</h2>
</div>

<div class="col-sm-12">
	<div id="view"  style="height: 400px;"></div>
</div>


</body>
<script>
void function(){
	var obj = ${obj};
	var dataJson = {
			"list":obj.list,
			"dataTool" : {
				"title" : {
					"id" : "ID标识",
					"name" : "用户名",
					"phone" : "电话号码"
				}
			}
		}
	showPageTable('view', dataJson, obj.num,obj.size,initTable);
}();
function initTable(num) {
	 $.pjax({
		url : "${base}/beetl/table/"+num+"/",
		container : '#pjax-container',
		timeout:6000
	}); 
} 



	//测试数据
/* 	var dataObj = {
		"list" : [ {
			"id" : "001",
			"teacherName" : "张三",
			"username" : "10013254",
			"gender" : "0",
			"subjectName" : "语文",
			"schoolTime" : "as 123"
		}, {
			"id" : "001",
			"teacherName" : "张三",
			"username" : "10013254",
			"gender" : "0",
			"subjectName" : "语文",
			"schoolTime" : "2014-09-01 8:54:12"
		}, {
			"id" : "001",
			"teacherName" : "张三",
			"username" : "10013254",
			"gender" : "1",
			"subjectName" : "语文",
			"schoolTime" : "2014-09-01 8:54:12"
		}, {
			"id" : "001",
			"teacherName" : "张三",
			"username" : "10013254",
			"gender" : "1",
			"subjectName" : "语文",
			"schoolTime" : "2014-09-01 8:54:12"
		}, {
			"id" : "001",
			"teacherName" : "张三",
			"username" : "10013254",
			"gender" : "",
			"subjectName" : "语文",
			"schoolTime" : "2014-09-01 8:54:12"
		}, {
			"id" : "001",
			"teacherName" : "张三",
			"username" : "10013254",
			"gender" : "",
			"subjectName" : "语文",
			"schoolTime" : "2014-09-01 8:54:12"
		} ],
		"dataTool" : {
			"title" : {
				"teacherName" : "教师姓名",
				"username" : "用户名",
				"gender" : "性别",
				"subjectName" : "科目",
				"schoolTime" : "加入学校时间",
				"opt" : "操作"
			},
			"titleCheckbox" : false,
			"noDataStatus" : true,
			"stateData" : [ {
				"stateField" : "gender",
				"stateArray" : [ {
					"0" : "男",
					"style" : "color:red;"
				}, {
					"1" : "女",
					"style" : "color:#999123;"
				}, {
					"" : "暂无",
					"style" : "color:#002991;"
				} ]
			} ],
			"href" : {
				"event" : "test",
				"field" : "teacherName"
			},
			"btnHref" : [ {
				"event" : "details",
				"name" : "详情"
			}, {
				"event" : "details",
				"name" : "删除",
				"style" : "color:red;"
			} ],

		}
	};

	//动态分页
	//test1(1, "张三", "20");
	//静态分页
	//test2();
	//不分页
	//test3();

	function test1(num, a, b) {
		//执行方法
		showPageTable('view', dataObj, num, 2, "test1", [ a, b ]);
	}

	function test2() {
		//执行方法
		showStaticPageTable('view', dataObj, 2);
	}

	function test3() {
		//执行方法
		showTable('view', dataObj);
	}

	function del() {
		alert(JSON.stringify(getCheckedJson("view")));
	}

	function details(params) {
		alert(JSON.stringify(params));
	} */
</script>
</html>